import { VantComponent } from '../../vant-weapp/dist/common/component'
import { GRAY_DARK } from '../common/color'
VantComponent({
  classes: ['desc-class'],
  props: {
    icon: String,
    steps: Array,
    active: Number,
    direction: {
      type: String,
      value: 'horizontal'
    },
    activeColor: {
      type: String,
      value: ''
    },
    activeIconColor: {
      type: String,
      value: ''
    },
    inactiveColor: {
      type: String,
      value: GRAY_DARK
    },
    activeIcon: {
      type: String,
      value: 'success'
    },
    center: {
      type: Boolean,
      value: true
    },
    iconSize: {
      type: String,
      value: 'normal'
    },
    useOrder: {
      type: Boolean,
      value: false
    },
    inactiveIcon: String
  },
  methods: {
    onClick (event) {
      const { index } = event.currentTarget.dataset
      this.$emit('click', index)
    }
  }
})
